import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import*
testCase="DBshop007_销售管理发货单"
firefox=openBrowser(url)
firefox.get(urlAdmin)
DBshopLoginAdmin(firefox)
# 1.进入后台销售管理发货单页面
DBshopEnterMenu2(firefox,'销售管理','发货单')
rootPath=get_pro_rootpath()
orderid=readFile(rootPath+'\public\order1.txt')
firefox.find_element_by_xpath("//td[text()='%s']/following-sibling::td[5]/a[1]"%orderid).click()
#断言：如果定位到发货单即测试成功
try:
    firefox.find_element_by_xpath("//div[contains(.,'发货单信息')]")
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
